Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: CreateCollection #6968

Closed

Conversation

stephenjason89
Copy link
Contributor

@stephenjason89 stephenjason89 commented Aug 26, 2023

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.

👇 __ Let's make a quick check before the contribution.

1st issue is the component registration, while dynamic import (lazy-loading) component registration in this syntax works on nuxt-bridge, it doesn't work on nuxt 3.

2nd issue is the unnecessary re-registration of watcher inside a submit function. This may cause bugs or may affect performance. Everytime the function is run, another watcher watching the same reactive reference & doing the same logic is created.

This issue is also present in

  • bsx/Create/CreateToken.vue
  • collection/drop/DropContainer.vue
  • rmrk/Create/CreateCollection.vue
  • rmrk/Create/CreateToken.vue
  • stmn/Create/CreateCollection.vue

Do we want to this changes and change all the above files as well?

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

Before submitting pull request, please make sure:

  • My contribution builds clean without any errors or warnings
  • I've merged recent default branch -- main and I've no conflicts
  • I've tried to respect high code quality standards
  • I've didn't break any original functionality

Optional

  • I've tested it at </ksm/collection>
  • I've tested PR on mobile
  • I've written unit tests 🧪
  • I've found edge cases

Did your issue had any of the "$" label on it?

  • Fill up your DOT address: Payout

Community participation

Screenshot 📸

  • My fix has changed something on UI; a screenshot is best to understand changes for others.

Copilot Summary

🤖 Generated by Copilot at 5621f42

Refactored component imports and added feedback for collection creation in CreateCollection.vue.

🤖 Generated by Copilot at 5621f42

To make the code more compact
Some components are imported direct
And when you create
A collection, you'll see
A feedback message that's perfect

@stephenjason89 stephenjason89 requested a review from a team as a code owner August 26, 2023 12:55
@stephenjason89 stephenjason89 requested review from preschian and daiagi and removed request for a team August 26, 2023 12:55
@kodabot
Copy link
Collaborator

kodabot commented Aug 26, 2023

SUCCESS @stephenjason89 PR for issue #6959 which is assigned to you. Please wait for review and don't hesitate to grab another issue in the meantime!

@netlify
Copy link

netlify bot commented Aug 26, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit 5621f42
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/64e9f63fa7b0640008aace13
😎 Deploy Preview https://deploy-preview-6968--koda-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@reviewpad
Copy link
Contributor

reviewpad bot commented Aug 26, 2023

AI-Generated Summary: This pull request contains two main patches.

The first patch addresses an issue related to incompatible dynamic import component registration on Nuxt 3. The dynamic imports previously being used have been replaced with static imports for a handful of components, including Loader, BaseCollectionForm, SubmitButton etc.

The second patch corrects an issue which led to the unnecessary re-registration of a watcher inside the submit function, potentially causing bugs. The watcher has been moved out of the submit function and is directly defined within the Vue component, effectively streamlining this process. These corrections contribute to overall performance optimization and bug prevention.

@reviewpad reviewpad bot added small Pull request is small waiting-for-review labels Aug 26, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@prury
Copy link
Member

prury commented Aug 29, 2023

#7016 preventing me from testing

@daiagi
Copy link
Contributor

daiagi commented Aug 29, 2023

I think this PR has been made redundant by

@stephenjason89
Copy link
Contributor Author

I think this PR has been made redundant by

That looks good. It's better to unify them all as it is indeed redundant

@daiagi daiagi closed this Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small Pull request is small waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor bsx/Create/CreateCollection.vue
4 participants